Skip to main content

Example: Using the INI File Utility SL Library

Product: CODESYS IIOT Libraries SL

The INI File Utility SL library provides function blocks to read, write, and find values in INI files.

Functionality

  • Read INI files by means of the INI_Reader function block

  • Write INI files by means of the INI_Writer function block

  • Find values by means of the INI_Get function block

Description

The individual values are mapped in an array of IniFileEntry type structures. The structure has fields for section, key, value, and comment.

Supported data structures:

;Kommentar
[Sektion]
;Kommentar
Schlüssel=Wert

Maximum field length

  • Section: 100 characters

  • Key: 100 characters

  • Value: 255 characters

  • Comment: 2555 characters

Visualization

_example_img_ini_file_utility_vis.png

Tip

To test the examples on a CODESYS Control Win, you can copy the INIReaderExample.ini file from the target directory of the installation to the c:\temp directory.

System requirements and restrictions

Programming system

CODESYS Development System (version 3.5.16.0 or higher)

Runtime system

CODESYS Control Win (version 3.5.16.0)

Supported platforms/devices

Tip

Use the Device Reader project to find out the supported features of your device. Device Reader is available free of charge in the CODESYS Store International.

Note

_example_icon.png IIoT Libraries SL

After installing the IIoT Libraries SL package, you will find the sample project in the CODESYS\IIoT Libraries SL\Examples subdirectory of the installation directory of CODESYS.